Skip to content

Conversation

@akash1810
Copy link
Member

@akash1810 akash1810 commented Nov 27, 2025

What does this change?

The VPCSecurityGroup security group allows ingress and egress to/from 0.0.0.0/0 on all protocols and ports. However the ASG is configured to launch instances in the VPC's private subnets (i.e. not routable from the internet) and the launch template explicitly sets AssociatePublicIpAddress to false. That is, there is no route from 0.0.0.0/0 to the EC2 instance. Therefore attaching VPCSecurityGroup to the EC2 instance has no effect and can be removed.

How to test

If we use AWS's Reachability Analyzer tool starting at the internet gateway and ending at an EC2 instance, we can see the only route is through the load balancer.

@akash1810 akash1810 changed the title feat(report): Remove VPCSecurityGroup from EC2 instances feat(report): Remove VPCSecurityGroup from EC2 instances Nov 27, 2025
@akash1810 akash1810 marked this pull request as ready for review November 27, 2025 13:54
@akash1810 akash1810 requested a review from a team as a code owner November 27, 2025 13:54
The `VPCSecurityGroup` group allows ingress and egress to/from 0.0.0.0/0 on all protocols and ports.

The ASG is configured to launch instances in the VPC's private subnets (i.e. not routable from the internet)
and the launch template explicitly sets `AssociatePublicIpAddress` to false.

That is, there is no route from 0.0.0.0/0 to the EC2 instance;
`VPCSecurityGroup` being attached to the EC2 instance has no effect and can be removed.
@akash1810 akash1810 force-pushed the aa/rm-VPCSecurityGroup branch from 2fde87e to ac1ad44 Compare November 28, 2025 15:31
@akash1810 akash1810 added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Nov 28, 2025
@akash1810
Copy link
Member Author

Somehow this change is preventing the load balancer from reaching the instance, consequently it's failing to deploy to CODE. Converting to draft whilst I investigate.

@akash1810 akash1810 marked this pull request as draft December 1, 2025 13:43
@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2026

This PR is stale because it has been open 30 days with no activity. Unless a comment is added or the “stale” label removed, this will be closed in 3 days

@github-actions github-actions bot added the Stale label Jan 1, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

This PR was closed because it has been stalled for 3 days with no activity.

@github-actions github-actions bot closed this Jan 5, 2026
@akash1810 akash1810 deleted the aa/rm-VPCSecurityGroup branch January 26, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Departmental tracking: maintenance work, not a fix or a feature Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants